package com.kma.summer2012.client.events;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: HP
 * Date: 10.03.13
 * Time: 15:44
 * To change this template use File | Settings | File Templates.
 */
public class ListOfIdEvent extends GwtEvent<ListOfIdEvent.ListOfIdEventHandler> {
    private static Type<ListOfIdEventHandler> TYPE = new Type<ListOfIdEventHandler>();

    public List<Integer> requestIdList;

    public ListOfIdEvent(List<Integer> requestIdList) {
        this.requestIdList = requestIdList;
    }

    @Override
    public Type<ListOfIdEventHandler> getAssociatedType() {
        return TYPE;
    }

    public static Type<ListOfIdEventHandler> getType() {
        return TYPE;
    }

    @Override
    protected void dispatch(ListOfIdEventHandler importRequestEventHandler) {
        importRequestEventHandler.onListOfId(this);
    }

    public interface ListOfIdEventHandler extends EventHandler {
        void onListOfId(ListOfIdEvent event);
    }
}
